package com.starbaba.mainicon.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang3.StringUtils;

import com.starbaba.model.utils.DaoImgUtils;

public class MainiconControlVO implements Serializable {


    private static final long serialVersionUID = 1L;
	
    private java.lang.Long id;
    
    private java.lang.Integer channel;
    
    private java.lang.String platform;
    
    private java.lang.Integer type;
    
    private java.lang.Integer minVersionCode;
    
    private java.lang.Integer maxVersionCode;
    
    private java.util.Date startTime;
    
    private java.util.Date endTime;
    
    private java.lang.Integer position;
    
    private java.lang.Integer orderNum;
    
    private java.lang.String title;
    
    private java.lang.String imgurl;
    
    private java.lang.String value;
    
    private java.lang.Integer openType;
    
    private java.lang.Integer status;
    
    private java.lang.String cityids;
    
    private java.lang.String badge;
    
    private java.lang.Integer mustLogin;
    
    private java.lang.String app_prd_id;
    
    private java.lang.String af_click_imgurl;
    
    private java.lang.String api;
	private java.lang.Integer display_way;
	private java.lang.String targeturl;
	private java.lang.String data_key;
	private java.lang.String operator;
	private java.lang.String except_channel;
	private java.lang.String business_condition;
	private Integer isTitleBarImmerse;
	private Integer isMyIconWhite;
	private String titleUrl;
    
    public MainiconControlVO(java.lang.Long id,java.lang.Integer channel,java.lang.String platform,java.lang.Integer type,java.lang.Integer minVersionCode,java.lang.Integer maxVersionCode,java.util.Date startTime,java.util.Date endTime,java.lang.Integer position,java.lang.Integer orderNum,java.lang.String title,java.lang.String imgurl,java.lang.String value,java.lang.Integer openType,java.lang.Integer status,java.lang.String api,java.lang.String cityids,java.lang.Integer badgeState,java.lang.String badgeText,java.lang.Integer badgeResident) {
        this.id = id;
        this.channel = channel;
        this.platform = platform;
        this.type = type;
        this.minVersionCode = minVersionCode;
        this.maxVersionCode = maxVersionCode;
        this.startTime = startTime;
        this.endTime = endTime;
        this.position = position;
        this.orderNum = orderNum;
        this.title = title;
        this.imgurl = imgurl;
        this.value = value;
        this.openType = openType;
        this.status = status;
        this.cityids = cityids;
        this.setBadge(badgeText);
    }

    public MainiconControlVO(java.lang.Long id) {
        this.id = id;
    }
    
    public MainiconControlVO() {
    }
    
    public java.lang.Long getId() {
        return this.id;
    }

    public void setId(java.lang.Long id) {
        this.id = id;
    }
    
    public java.lang.Integer getChannel() {
        return this.channel;
    }

    public void setChannel(java.lang.Integer channel) {
        this.channel = channel;
    }
    
    public java.lang.String getPlatform() {
        return this.platform;
    }

    public void setPlatform(java.lang.String platform) {
        this.platform = platform;
    }
    
    public java.lang.Integer getType() {
        return this.type;
    }

    public void setType(java.lang.Integer type) {
        this.type = type;
    }
    
    public java.lang.Integer getMinVersionCode() {
        return this.minVersionCode;
    }

    public void setMinVersionCode(java.lang.Integer minVersionCode) {
        this.minVersionCode = minVersionCode;
    }
    
    public java.lang.Integer getMaxVersionCode() {
        return this.maxVersionCode;
    }

    public void setMaxVersionCode(java.lang.Integer maxVersionCode) {
        this.maxVersionCode = maxVersionCode;
    }
    
    public java.util.Date getStartTime() {
        return this.startTime;
    }

    public void setStartTime(java.util.Date startTime) {
        this.startTime = startTime;
    }
    
    public java.util.Date getEndTime() {
        return this.endTime;
    }

    public void setEndTime(java.util.Date endTime) {
        this.endTime = endTime;
    }
    
    public java.lang.Integer getPosition() {
        return this.position;
    }

    public void setPosition(java.lang.Integer position) {
        this.position = position;
    }
    
    public java.lang.Integer getOrderNum() {
        return this.orderNum;
    }

    public void setOrderNum(java.lang.Integer orderNum) {
        this.orderNum = orderNum;
    }
    
    public java.lang.String getTitle() {
        return this.title;
    }

    public void setTitle(java.lang.String title) {
        this.title = title;
    }
    
    public java.lang.String getImgurl() {
        if(StringUtils.isEmpty(imgurl)){
            return "";
        }
        return DaoImgUtils.dealWidthUrl(imgurl);
    }

    public void setImgurl(java.lang.String imgurl) {
        this.imgurl = imgurl;
    }
    
    public java.lang.String getValue() {
        return this.value;
    }

    public void setValue(java.lang.String value) {
        this.value = value;
    }
    
    public java.lang.Integer getOpenType() {
        return this.openType;
    }

    public void setOpenType(java.lang.Integer openType) {
        this.openType = openType;
    }
    
    public java.lang.Integer getStatus() {
        return this.status;
    }

    public void setStatus(java.lang.Integer status) {
        this.status = status;
    }
    
    public java.lang.String getCityids() {
        return this.cityids;
    }

    public void setCityids(java.lang.String cityids) {
        this.cityids = cityids;
    }
    
    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof MainiconControlVO) ) return false;
        MainiconControlVO castOther = (MainiconControlVO) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }

	public java.lang.String getBadge() {
		return badge;
	}

	public void setBadge(java.lang.String badge) {
		this.badge = badge;
	}

	public java.lang.Integer getMustLogin() {
		return mustLogin;
	}

	public void setMustLogin(java.lang.Integer mustLogin) {
		this.mustLogin = mustLogin;
	}

	public java.lang.String getApp_prd_id() {
		return app_prd_id;
	}

	public void setApp_prd_id(java.lang.String app_prd_id) {
		this.app_prd_id = app_prd_id;
	}

	public java.lang.String getAf_click_imgurl() {
		if (StringUtils.isEmpty(af_click_imgurl)) {
			return "";
		}
		return DaoImgUtils.dealWidthUrl(af_click_imgurl);
	}

	public void setAf_click_imgurl(java.lang.String af_click_imgurl) {
		this.af_click_imgurl = af_click_imgurl;
	}

	public java.lang.String getApi() {
		return api;
	}

	public void setApi(java.lang.String api) {
		this.api = api;
	}

	public java.lang.Integer getDisplay_way() {
		return display_way;
	}

	public void setDisplay_way(java.lang.Integer display_way) {
		this.display_way = display_way;
	}

	public java.lang.String getTargeturl() {
		return targeturl;
	}

	public void setTargeturl(java.lang.String targeturl) {
		this.targeturl = targeturl;
	}

	public java.lang.String getData_key() {
		return data_key;
	}

	public void setData_key(java.lang.String data_key) {
		this.data_key = data_key;
	}

	public java.lang.String getExcept_channel() {
		return except_channel;
	}

	public void setExcept_channel(java.lang.String except_channel) {
		this.except_channel = except_channel;
	}

	public java.lang.String getOperator() {
		return operator;
	}

	public void setOperator(java.lang.String operator) {
		this.operator = operator;
	}

	public java.lang.String getBusiness_condition() {
		return business_condition;
	}

	public void setBusiness_condition(java.lang.String business_condition) {
		this.business_condition = business_condition;
	}

    public Integer getIsTitleBarImmerse() {
        return isTitleBarImmerse;
    }

    public void setIsTitleBarImmerse(Integer isTitleBarImmerse) {
        this.isTitleBarImmerse = isTitleBarImmerse;
    }

    public Integer getIsMyIconWhite() {
        return isMyIconWhite;
    }

    public void setIsMyIconWhite(Integer isMyIconWhite) {
        this.isMyIconWhite = isMyIconWhite;
    }

    public String getTitleUrl() {
        return titleUrl;
    }

    public void setTitleUrl(String titleUrl) {
        this.titleUrl = titleUrl;
    }
}
